﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using XMLTrays;
using FileTrays;

namespace PruebasBorrar
{
    public partial class Form1 : Form
    {
        //private XMLInbox bandeja;
        //private XMLOutbox salida;
        private FileOutbox salida;
        private FileInbox bandeja;
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            //bandeja = new XMLInbox();
            bandeja = new FileInbox();
            panel1.Controls.Add(bandeja.getConfigurationWindow());
            
        }

        private void button2_Click(object sender, EventArgs e)
        {
            textBox1.Text = bandeja.getCount().ToString();
            bandeja.readMessage();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            bandeja.markAsRead();
        }

        private void button4_Click(object sender, EventArgs e)
        {
            salida = new FileOutbox();
            panel2.Controls.Add(salida.getConfigurationWindow());
        }

        private void button5_Click(object sender, EventArgs e)
        {
            salida.writeMessage(bandeja.readMessage());
        }
    }
}
